package com.htfyun.pdfview;

import android.graphics.Bitmap;
import android.view.OwnerSurfaceView;
import android.view.View;

/**
 * Created by sst on 2018/1/23.
 */

public class PWSurfaceOfOwnerSurfaceView implements IPWSurfaceView {

    private OwnerSurfaceView ownerSurfaceView;
    public PWSurfaceOfOwnerSurfaceView(OwnerSurfaceView view) {
        ownerSurfaceView = view;
    }
    
    @Override
    public Bitmap getBitmap() {
        return ownerSurfaceView.getPureWriteBitmap();
    }

    @Override
    public void clear() {

        ownerSurfaceView.clearContent(null, false, true);
    }

    @Override
    public void undo() {
        ownerSurfaceView.unDo();
    }

    @Override
    public void setHostView(View hostView) {

        ownerSurfaceView.setHostView(hostView);//, null, false);
        
    }

    @Override
    public void setVisibility(int visibility) {
        ownerSurfaceView.setVisibility(visibility);
    }

    @Override
    public void setDrawObjectType(int drawObjectType) {
        ownerSurfaceView.setDrawObjectType(drawObjectType);
    }

    @Override
    public int getDrawObjectType() {
        return ownerSurfaceView.getDrawObjectType();
    }

    @Override
    public void setPenSettingWidth(int penSettingWidth) {
        ownerSurfaceView.setPenSettingWidth(penSettingWidth);
    }

    @Override
    public int getPenSettingWidth() {
        return ownerSurfaceView.getPenSettingWidth();
    }
}
